/**
 * jims
 */
package com.jims.master.modules.doctor.service;

import com.jims.master.common.persistence.Page;
import com.jims.master.common.service.CrudService;
import com.jims.master.modules.doctor.dao.LabItemDao;
import com.jims.master.modules.doctor.entity.LabItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 检验申请明细Service
 * @author 陈晓阳
 * @version 2017-03-16
 */
@Service
@Transactional(readOnly = true)
public class LabItemService extends CrudService<LabItemDao, LabItem> {

    @Autowired
    private LabItemDao labItemDao;
	public LabItem get(String id) {
		return super.get(id);
	}
	
	public List<LabItem> findList(LabItem labItem) {
		return super.findList(labItem);
	}
	
	public Page<LabItem> findPage(Page<LabItem> page, LabItem labItem) {
		return super.findPage(page, labItem);
	}
	
	@Transactional(readOnly = false)
	public int save(LabItem labItem) {
		return super.save(labItem);
	}
	
	@Transactional(readOnly = false)
	public int delete(LabItem labItem) {
		return super.delete(labItem);
	}

    /**
     * 根据检验申请主表删除检验申请明细
     * @param applyId
     * @return
     * @Author 陈晓阳
     */
    @Transactional(readOnly = false)
    public int deleteByApplyId(String applyId) {
        return this.labItemDao.deleteByApplyId(applyId);
    }

	public List queryByApplyId(String applyId){
		return this.labItemDao.queryByApplyId(applyId);
	}
}